package com.balabala.goods.api;

import com.balabala.goods.pojo.dto.BookCourseQueryDto;
import com.balabala.goods.pojo.vo.BookCourseDto;
import com.balabala.goods.pojo.vo.CourseDto;
import com.balabala.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Author:zl
 * Date:2023/5/6 19:50
 */
@FeignClient(value = "gym-goods-service", contextId = "courseFeign")
public interface CourseFeignClient {

    @GetMapping("/admin/course/findAll")
    public Result<List<CourseDto>> findAll();

    //根据条件查询预约课程列表
    @PostMapping("/admin/BookCourse/findListByQueryDto")
    public Result<List<BookCourseDto>> findListByQueryDto(BookCourseQueryDto bookCourseQueryDto);



    //根据预约课程id查询预约课程信息
    @GetMapping("/admin/BookCourse/findByScheduleId")
    public Result<BookCourseDto> findByScheduleId(@RequestParam Long scheduleId);

    //修改课程信息
    @PostMapping("/admin/course/update")
    public  Result<CourseDto> update(CourseDto courseDto);

    //根据id查询课程信息
    @GetMapping("/admin/course/getCourseById")
    public Result<CourseDto> getCourseById(@RequestParam("id") Long id);

}
